home *** CD-ROM | disk | FTP | other *** search
-
- #include "../CGVPMacro.csi"
-
-
- VertAttributes { POSITION_3 PRIM_COLOR }
-
- MainInput { VIEWPROJ_MATRIX, CAMERA_POS, uniform float2x4 CaustTexGen, uniform float3 WaterLevel }
- DeclarationsScript
- {
- IN_C0
- OUT_T0_C0
- }
- PositionScript = PosCommon
- CoreScript
- {
- OUT.Tex0.xy = mul(CaustTexGen, vPos);
-
- float fDistBlendFactor = vPos.w - length(vPos.xyz - CameraPos.xyz) * CameraPos.w;
- OUT.Color.w = fDistBlendFactor * (float)((WaterLevel.x - vPos.z) >= vPos.w);
- OUT.Color.xyz = IN.Color.w;
- }
-